<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%--
  Created by IntelliJ IDEA.
  User: focus
  Date: 2018/1/5
  Time: 20:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../base.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
    <meta name="renderer" content="webkit" />
    <title>WeCenter 社交化问答社区程序</title>
    <meta name="keywords" content="wecenter,知识社区,企业社区,社交问答,问答社区,企业社交,开源社区程序,社交社区程序,开源问答程序,问答网站,social question,微信,微信公众平台,微信开发,微信开发社区,微信应用" />
    <meta name="description" content="WeCenter 是一款知识型的社交化问答社区程序，专注于社区内容的整理、归类和检索，并通过连接微信公众平台，移动APP进行内容分发。"  />
    <base href="<%=basePath%>">
    <link href="css/default/img/favicon.ico?v=20160523" rel="shortcut icon" type="image/x-icon" />
    <link rel="stylesheet" type="text/css" href="css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="css/icon.css" />
    <link href="css/default/common.css?v=20160523" rel="stylesheet" type="text/css" />
    <link href="css/default/link.css?v=20160523" rel="stylesheet" type="text/css" />
    <link href="js/plug_module/style.css?v=20160523" rel="stylesheet" type="text/css" />

    <script type="text/javascript">
        var _7F0844F8825401576D81853429FB1016="";
        var G_POST_HASH=_7F0844F8825401576D81853429FB1016;
        var G_INDEX_SCRIPT = "";
        var G_SITE_NAME = "WeCenter 社交化问答社区程序";
        var G_BASE_URL = "http://wenda.wecenter.com";
        var G_STATIC_URL = "http://wenda.wecenter.com/static";
        var G_UPLOAD_URL = "http://wenda.wecenter.com/uploads";
        var G_USER_ID = "";
        var G_USER_NAME = "";
        var G_UPLOAD_ENABLE = "N";
        var G_UNREAD_NOTIFICATION = 0;
        var G_NOTIFICATION_INTERVAL = 100000;
        var G_CAN_CREATE_TOPIC = "";
        var G_ADVANCED_EDITOR_ENABLE = "Y";
        var FILE_TYPES = "jpg,jpeg,png,zip,rar,7z";
    </script>

    <script src="js/jquery.2.js?v=20160523" type="text/javascript"></script>
    <script src="js/jquery.form.js?v=20160523" type="text/javascript"></script>
    <script src="js/plug_module/plug-in_module.js?v=20160523" type="text/javascript"></script>
    <script src="js/aws.js?v=20160523" type="text/javascript"></script>
    <script src="js/aw_template.js?v=20160523" type="text/javascript"></script>
    <script src="js/app.js?v=20160523" type="text/javascript"></script>
    <script type="text/javascript" src="js/compatibility.js"></script>
    <!--[if lte IE 8]>
    <script type="text/javascript" src="js/respond.js"></script>
    <![endif]-->
</head>
<noscript unselectable="on" id="noscript">
    <div class="aw-404 aw-404-wrap container">
        <img src="common/no-js.jpg">
        <p>你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!</p>
    </div>
</noscript>
<body>
<%@ include file="../common/header.jsp"%>
<div class="aw-container-wrap">
    <div class="container">
        <div class="row">
            <div class="aw-content-wrap clearfix">
                <div class="col-sm-12 col-md-9 aw-main-content">
                    <!-- 新消息通知 -->
                    <div class="aw-mod aw-notification-box collapse" id="index_notification">
                        <div class="mod-head common-head">
                            <h2>
                                <span class="pull-right"><a href="http://wenda.wecenter.com/account/setting/privacy/#notifications" class="text-color-999"><i class="icon icon-setting"></i> 通知设置</a></span>
                                <i class="icon icon-bell"></i>新通知<em class="badge badge-important" name="notification_unread_num"></em>
                            </h2>
                        </div>
                        <div class="mod-body">
                            <ul id="notification_list"></ul>
                        </div>
                        <div class="mod-footer clearfix">
                            <a href="javascript:;" onclick="AWS.Message.read_notification(false, 0, false);" class="pull-left btn btn-mini btn-gray">我知道了</a>
                            <a href="http://wenda.wecenter.com/notifications/" class="pull-right btn btn-mini btn-success">查看所有</a>
                        </div>
                    </div>
                    <!-- end 新消息通知 -->
                    <!-- tab切换 -->
                    <ul class="nav nav-tabs aw-nav-tabs active hidden-xs">
                        <li><a href="index/hot/1" id="sort_control_hot">热门</a></li>
                        <li class="active"><a href="index/new/1">最新</a></li>
                        <h2 class="hidden-xs"><i class="icon icon-list"></i> 发现</h2>
                    </ul>
                    <!-- end tab切换 -->
                    <div class="aw-mod aw-explore-list">
                        <div class="mod-body">
                            <div class="aw-common-list">
                                <c:forEach var="q" items="${result.list}">
                                    <div class="aw-item " data-topic-id="<c:forEach var="t" items="${q.involvedTopics}">${t.id},</c:forEach> ">
                                        <a class="aw-user-name hidden-xs" data-id="${q.user.id}" href="user/${q.user.username}" rel="nofollow"><img src="${q.user.headPortrait}" alt="${q.user.username}" /></a>
                                        <div class="aw-question-content">
                                            <h4>
                                                <a href="question/${q.id}">${q.title}</a>
                                            </h4>
                                            <p>
                                                <a class="aw-question-tags" href="http://wenda.wecenter.com/explore/category-2">${q.category}</a>
                                                <c:forEach var="a" items="${q.answers}" varStatus="status">
                                                    <c:if test="${status.count eq status.index + 1}">
                                                        <c:set var="a" scope="request" value="${a}" />
                                                        <c:set var="status" value="0" />
                                                    </c:if>
                                                </c:forEach>
                                                <c:if test="${a ne null}">
                                                • <a href="people/${a.user.username}" class="aw-user-name" data-id="${a.user.id}">${a.user.username}</a>
                                                </c:if>
                                                <span class="text-color-999"><c:if test="${a ne null}">回复了问题</c:if> • ${q.concernNumber} 人关注 • ${q.answerCount} 个回复 • <fmt:formatDate value="${q.createTime}" pattern="yyyy-MM-dd HH:mm:ss" /></span>
                                                <a href="http://wenda.wecenter.com/question/31739#!answer_form" class="pull-right text-color-999">回复</a>
                                            </p>
                                        </div>
                                    </div>
                                </c:forEach>
                            </div>
                        </div>
                        <div class="mod-footer">
                            <%@ include file="../common/page.jsp"%>
                        </div>
                    </div>
                </div>

                <!-- 侧边栏 -->
                <div class="col-sm-12 col-md-3 aw-side-bar hidden-xs hidden-sm">
                    <div class="aw-mod aw-text-align-justify">
                        <div class="mod-head">
                            <a href="http://wenda.wecenter.com/people/" class="pull-right">更多 &gt;</a>
                            <h3>热门用户</h3>
                        </div>
                        <div class="mod-body">
                            <c:forEach var="u" items="${userList}">
                            <dl>
                                <dt class="pull-left aw-border-radius-5">
                                    <a href="people/${u.username}"><img alt="" src="${u.headPortrait}" /></a>
                                </dt>
                                <dd class="pull-left">
                                    <a href="people/${u.username}" data-id="${u.id}" class="aw-user-name">${u.username}</a>
                                    <p class="signature"></p>
                                    <p><b>${u.questionCount}</b> 个问题, <b>${u.agreeCount}</b> 次赞同</p>
                                </dd>
                            </dl>
                            </c:forEach>
                        </div>
                    </div>
                </div>
                <!-- end 侧边栏 -->
            </div>
        </div>
    </div>
</div>
<a class="aw-back-top hidden-xs" href="javascript:;" onclick="$.scrollTo(1, 600, {queue:true});"><i class="icon icon-up"></i></a>
<div id="aw-ajax-box" class="aw-ajax-box"></div>
</body>
</html>
